import random;
r = random
n = 5000;
print(n);
for i in range(n):
	for j in range(n):
		print(r.randint(0, 1),end='');
	print();